package cn.tedu.baidashi.controller;

import cn.tedu.baidashi.service.IItemsService;
import cn.tedu.baidashi.vo.ItemsInfoVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class ItemsController {

    @Resource
    private IItemsService itemsService;

    @GetMapping("/items/{itemsId}")
    public ItemsInfoVO getItemsInfo(@PathVariable Integer itemsId){
        ItemsInfoVO itemsInfoVO = itemsService.getItemsInfoById(itemsId);
        return itemsInfoVO;
    }

}
